Witnessing Program Transformations
نویسندگان
چکیده
We study two closely related problems: (a) showing that a program transformation is correct and (b) propagating an invariant through a program transformation. The second problem is motivated by an application which utilizes program invariants to improve the quality of compiler optimizations. We show that both problems can be addressed by augmenting a transformation with an auxiliary witness generation procedure. For every application of the transformation, the witness generator constructs a relation which guarantees the correctness of that instance. We show that stuttering simulation is a sound and complete witness format. Completeness means that, under mild conditions, every correct transformation induces a stuttering simulation witness which is strong enough to prove that the transformation is correct. A witness is self-contained, in that its correctness is independent of the optimization procedure which generates it. Any invariant of a source program can be turned into an invariant of the target of a transformation by suitably composing it with its witness. Stuttering simulations readily compose, forming a single witness for a sequence of transformations. Witness generation is simpler than a formal proof of correctness, and it is comprehensive, unlike the heuristics used for translation validation. We define witnesses for a number of standard compiler optimizations; this exercise shows that witness generators can be implemented quite easily.
منابع مشابه
A Witnessing Compiler: A Proof of Concept
In prior work we proposed a mechanism of “witness generation and propagation” to construct proofs of the correctness of program transformations. Here we present a simpler theory, and describe our experience with an initial implementation based on the LLVM open-source compiler and the Z3 SMT solver.
متن کاملWitnessing Network Transformations
Software-defined networking (SDN) is transforming the way networks are managed, as fixed distributed protocols give way to flexible route calculation software. The shift brings to the forefront the issue of software errors, which may produce wrong routes, and cause significant network disruption. We propose a run-time certification mechanism that rejects any wrongly calculated route before it i...
متن کاملTop Picks from the 2012 Computer Architecture
......In recent years, information technology (IT) has been witnessing major transformations placing unprecedented demands on efficient processing, communication, and storage of data. These transformations are driven by both the slowdown in energy efficiency in modern circuits and fabrication technologies and by the emergence of ‘‘big data’’ requiring not only higher efficiency in manipulating ...
متن کاملTop Picks from the 2012 Computer Architecture Conferences
......In recent years, information technology (IT) has been witnessing major transformations placing unprecedented demands on efficient processing, communication, and storage of data. These transformations are driven by both the slowdown in energy efficiency in modern circuits and fabrication technologies and by the emergence of ‘‘big data’’ requiring not only higher efficiency in manipulating ...
متن کاملA Logic for Correlating Temporal Properties across Program Transformations
Program transformations are widely used in synthesis, optimization, and maintenance of software. Correctness of program transformations depends on preservation of some important properties of the input program. By regarding programs as Kripke structures, many interesting properties of programs can be expressed in temporal logics. In temporal logic, a formula is interpreted on a single program. ...
متن کامل